package com.tsystems.tuni.sportplanet.ws;

import java.util.List;

import javax.ejb.EJB;
import javax.jws.WebMethod;
import javax.jws.WebService;

import com.tsystems.tuni.sportplanet.businesslogic.SponsorStatisticImpl;
import com.tsystems.tuni.sportplanet.businesslogic.accessinterfaces.SponsorStaticticBeanLocal;
import com.tsystems.tuni.sportplanet.entity.Company;
import com.tsystems.tuni.sportplanet.entity.Location;
import com.tsystems.tuni.sportplanet.entity.Season;
import com.tsystems.tuni.sportplanet.entity.Sport;
import com.tsystems.tuni.sportplanet.entity.Team;

@WebService(endpointInterface = "com.tsystems.tuni.sportplanet.ws.SponsorStatisticsWS")
public class SponsorStatisticsWSImpl implements SponsorStatisticsWS {
	@EJB
	private SponsorStaticticBeanLocal spStatisticBean;

	public SponsorStatisticsWSImpl() {
		spStatisticBean = new SponsorStatisticImpl();
	}

	@Override
	@WebMethod
	public List<Team> getAllTeam() {
		return spStatisticBean.getAllTeam();
	}

	@Override
	@WebMethod
	public List<Sport> getAllSport() {
		return spStatisticBean.getAllSport();
	}

	@Override
	@WebMethod
	public List<Location> getAllLocationBySport(Sport sport) {
		return spStatisticBean.getAllLocationBySport(sport);
	}

	@Override
	@WebMethod
	public List<Team> getTeamsFromCity(String city, Sport sport) {
		return spStatisticBean.getTeamsFromCity(city, sport);
	}

	@Override
	@WebMethod
	public int getLastTeamScore(Team team) {
		return spStatisticBean.getLastTeamScore(team);
	}

	@Override
	@WebMethod
	public List<Season> getPlayedSeason(Team team) {
		return spStatisticBean.getPlayedSeason(team);
	}

	@Override
	@WebMethod
	public int getTeamScoreFromSeason(Team team, Season season) {
		return spStatisticBean.getTeamScoreFromSeason(team, season);
	}

	@Override
	@WebMethod
	public Company getCompanyByTeam(Team team) {
		return spStatisticBean.getCompanyByTeam(team);
	}

	@Override
	@WebMethod
	public Location getCompanyLocation(Company company) {
		return spStatisticBean.getCompanyLocation(company);
	}

}
